<template>
  <div style="width: 100%">
    <div class="twobox">
      <div class="index_part_title">
        <span> <i class="el-icon-s-custom"></i>线索统计</span>
        <i class="el-icon-refresh refresh" @click.stop="refresh('pending')"></i>
      </div>
      <div class="index_two_body">
        <div class="index_two_item">
          <div>
            <div>
              <p>{{ three1["百度线索引流量"] }}</p>
              <p>线索引流量</p>
            </div>
            <div>
              <img src="././../../../assets/img/index/路径 102.png" alt="" />
              <p>线索成交量：{{ three1["百度线索成交量"] }}</p>
            </div>
          </div>
          <p><span>转化比例值：</span>{{ three1["百度转化比例值"] }}%</p>
        </div>
        <div class="index_two_item">
          <div>
            <div>
              <p>{{ three1["抖音线索引流量"] }}</p>
              <p>线索引流量</p>
            </div>
            <div>
              <img src="././../../../assets/img/index/组 127.png" alt="" />
              <p>线索成交量：{{ three1["抖音线索成交量"] }}</p>
            </div>
          </div>
          <p><span>转化比例值：</span>{{ three1["抖音转化比例值"] }}%</p>
        </div>
        <div class="index_two_item">
          <div>
            <div>
              <p>{{ three1["淘宝线索引流量"] }}</p>
              <p>线索引流量</p>
            </div>
            <div>
              <img src="././../../../assets/img/index/组 128.png" alt="" />
              <p>线索成交量：{{ three1["淘宝线索成交量"] }}</p>
            </div>
          </div>
          <p><span>转化比例值：</span>{{ three1["淘宝转化比例值"] }}%</p>
        </div>
        <div class="index_two_item">
          <div>
            <div>
              <p>{{ three1["京东线索引流量"] }}</p>
              <p>线索引流量</p>
            </div>
            <div>
              <img src="././../../../assets/img/index/组 129.png" alt="" />
              <p>线索成交量：{{ three1["京东线索成交量"] }}</p>
            </div>
          </div>
          <p><span>转化比例值：</span>{{ three1["京东转化比例值"] }}%</p>
        </div>
      </div>
    </div>
    <div class="twobox">
      <div class="index_part_title">
        <span> <i class="el-icon-s-custom"></i>线索统计</span>
        <i class="el-icon-refresh refresh" @click.stop="refresh('pending')"></i>
      </div>
      <div class="index_three_body">
        <div class="index_threebox_item">
          <div>
            <div>
              <p>{{ three1["会员分销"] }}</p>
              <p>会员分销</p>
            </div>
            <img src="././../../../assets/img/index/路径 123.png" alt="" />
          </div>
        </div>
        <div class="index_threebox_item">
          <div>
            <div>
              <p>{{ three1["自来客"] }}</p>
              <p>自来客</p>
            </div>
            <img src="././../../../assets/img/index/路径 125.png" alt="" />
          </div>
        </div>
        <div class="index_threebox_item">
          <div>
            <div>
              <p>{{ three1["员工拓展"] }}</p>
              <p>员工拓展</p>
            </div>
            <img src="././../../../assets/img/index/路径 127.png" alt="" />
          </div>
        </div>
        <div class="index_threebox_item">
          <div>
            <div>
              <p>{{ three1["股东拓展"] }}</p>
              <p>股东拓展</p>
            </div>
            <img src="././../../../assets/img/index/组 145.png" alt="" />
          </div>
        </div>
        <div class="index_threebox_item">
          <div>
            <div>
              <p>{{ three1["代理拓客"] }}</p>
              <p>代理拓客</p>
            </div>
            <img src="././../../../assets/img/index/组 147.png" alt="" />
          </div>
        </div>
        <div class="index_threebox_item">
          <div>
            <div>
              <p>{{ three1["其他渠道"] }}</p>
              <p>其他渠道</p>
            </div>
            <img src="././../../../assets/img/index/路径 145.png" alt="" />
          </div>
        </div>
      </div>
    </div>

    <div class="twobox">
      <div class="index_part_title">
        <span> <i class="el-icon-s-custom"></i>库存统计</span>
        <i class="el-icon-refresh refresh" @click.stop="refresh('pending')"></i>
      </div>
      <div class="index_three_body">
        <div class="index_threebox_item">
          <div>
            <div>
              <p>{{ three1["总部库存"] }}</p>
              <p>总部库存</p>
            </div>
            <img
              src="././../../../assets/img/index/组 86.png"
              style="width: 40px"
            />
          </div>
        </div>
        <div class="index_threebox_item">
          <div>
            <div>
              <p>{{ three1["门店库存"] }}</p>
              <p>门店库存</p>
            </div>
            <img
              src="././../../../assets/img/index/组 19.png"
              style="width: 40px"
            />
          </div>
        </div>
        <div class="index_threebox_item">
          <div>
            <div>
              <p>{{ three1["累计进货金额"] }}</p>
              <p>累计进货金额</p>
            </div>
            <img
              src="././../../../assets/img/index/组 20.png"
              style="width: 40px"
            />
          </div>
        </div>
        <div class="index_threebox_item">
          <div>
            <div>
              <p>{{ three1["累计退货总金额"] }}</p>
              <p>累计退货总金额</p>
            </div>
            <img
              src="././../../../assets/img/index/路径 21.png"
              style="width: 40px"
            />
          </div>
        </div>
      </div>
    </div>

    <div class="dzbox">
      <div class="dzboxcon">
        <div class="index_part_title">
          <span> <i class="el-icon-s-custom"></i>企业数据</span>
          <i
            class="el-icon-refresh refresh"
            @click.stop="refresh('pending')"
          ></i>
        </div>
        <div class="index_dz_body">
          <div class="index_dz_item">
            <img src="././../../../assets/img/index/路径 44.png" alt="" />
            <p>{{ three1["门店数量"] }}</p>
            <p>门店数量</p>
          </div>
          <div class="index_dz_item">
            <img src="././../../../assets/img/index/组 87.png" alt="" />
            <p>{{ three1["员工数量"] }}</p>
            <p>员工数量</p>
          </div>
          <div class="index_dz_item">
            <img src="././../../../assets/img/index/路径 47.png" alt="" />
            <p>{{ three1["主管数量"] }}</p>
            <p>主管数量</p>
          </div>
          <div class="index_dz_item">
            <img src="././../../../assets/img/index/组 88.png" alt="" />
            <p>{{ three1["股东数量"] }}</p>
            <p>股东数量</p>
          </div>
        </div>
      </div>
      <div class="dzboxcon">
        <div class="index_part_title">
          <span> <i class="el-icon-s-custom"></i>销售线索数据</span>
          <i
            class="el-icon-refresh refresh"
            @click.stop="refresh('pending')"
          ></i>
        </div>
        <div class="index_dz_body">
          <div class="index_dz_item">
            <img src="././../../../assets/img/index/组 89.png" alt="" />
            <p>{{ three1["公海线索量"] }}</p>
            <p>公海线索量</p>
          </div>
          <div class="index_dz_item">
            <img src="././../../../assets/img/index/组 90.png" alt="" />
            <p>{{ three1["跟进中线索"] }}</p>
            <p>跟进中线索</p>
          </div>
          <div class="index_dz_item">
            <img src="././../../../assets/img/index/组 91.png" alt="" />
            <p>{{ three1["已成交线索"] }}</p>
            <p>已成交线索</p>
          </div>
          <div class="index_dz_item">
            <img src="././../../../assets/img/index/组 92.png" alt="" />
            <p>{{ three1["最近活跃线索"] }}</p>
            <p>最近活跃线索</p>
          </div>
        </div>
      </div>
    </div>

    <el-row :span="24" :gutter="20" style="width: 100%; margin-top: 20px">
      <el-col :span="3" v-for="(item, i) in data" :key="i">
        <div class="index_three">
          <img
            :src="
              require(`./../../../assets/img/index/three${(i % 7) + 1}.png`)
            "
            alt=""
          />
          <p>{{ item[1] }}</p>
          <p>{{ item[0] }}</p>
        </div>
      </el-col>
    </el-row>
  </div>
</template>
<script>
import { mapState } from "vuex";
export default {
  data() {
    return {};
  },
  computed: {
    ...mapState({
      is_open: (state) => state.plugin,
    }),
  },
  props: {
    data: {
      type: Array,
      default: () => [],
    },
    three1: {
      type: [Object, Boolean],
    },
  },
  components: {},
  methods: {
    refresh(type) {
      this.$bus.$emit("refresh", type);
    },
  },
};
</script>
<style lang="less" scoped>
.twobox {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0px 5px 20px #e4e4e4;
  border-radius: 5px;
  overflow: auto;
  margin: 0 auto 20px;
}

.index_two_body {
  width: 100%;
  padding: 15px;
  background-color: #ffffff;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  .index_two_item:not(:last-child) {
    margin-right: 15px;
  }
  .index_two_item {
    flex: 1;
    height: 140px;
    display: flex;
    flex-flow: column;
    justify-content: center;
    background-color: #fbfbfb;
    padding: 0 15px;
    > div {
      width: 100%;
      flex: 1;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #e8eaec;
      > div:nth-of-type(1) {
        display: flex;
        flex-flow: column;
        justify-content: flex-start;
        align-items: flex-start;
        > p:nth-of-type(1) {
          font-size: 30px;
          font-weight: bold;
          color: #212121;
          line-height: 50px;
        }
        > p:nth-of-type(2) {
          font-size: 15px;
          color: #212121;
        }
      }

      > div:nth-of-type(2) {
        font-size: 15px;
        color: #212121;
        text-align: right;
        > img {
          height: 35px;
          margin-bottom: 5px;
        }
      }
    }
    > p {
      width: 100%;
      height: 40px;

      font-size: 15px;
      color: #ed4014;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      > span {
        color: #212121;
      }
    }
  }
}

.index_three_body {
  width: 100%;
  padding: 15px;
  background-color: #ffffff;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  .index_threebox_item:not(:last-child) {
    margin-right: 15px;
  }
  .index_threebox_item {
    flex: 1;
    height: 110px;
    display: flex;
    flex-flow: column;
    justify-content: center;
    background-color: #fbfbfb;
    padding: 0 15px;
    > div {
      width: 100%;
      flex: 1;
      display: flex;
      justify-content: space-between;
      align-items: center;
      > img {
        width: 50px;
      }
      > div {
        display: flex;
        flex-flow: column;
        justify-content: flex-start;
        align-items: flex-start;
        > p:nth-of-type(1) {
          font-size: 30px;
          font-weight: 400;
          color: #515a6e;
          line-height: 50px;
        }
        > p:nth-of-type(2) {
          font-size: 15px;
          color: #212121;
        }
      }
    }
  }
}

.dzbox {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;

  .dzboxcon {
    width: 49.5%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0px 5px 20px #e4e4e4;
    border-radius: 5px;
    overflow: auto;

    .index_dz_body {
      width: 100%;
      padding: 15px;
      background-color: #ffffff;
      display: flex;
      flex-wrap: nowrap;
      justify-content: flex-start;
      .index_dz_item:not(:last-child) {
        margin-right: 15px;
      }
      .index_dz_item {
        flex: 1;
        height: 110px;
        display: flex;
        flex-flow: column;
        justify-content: center;
        align-items: center;
        background-color: #fbfbfb;
        padding: 0 15px;
        > img {
          height: 30px;
          margin-bottom: 5px;
        }
        > p:nth-of-type(1) {
          font-size: 26px;
          font-weight: 500;
          color: #212121;
        }
        > p:nth-of-type(2) {
          font-size: 14px;
          color: #515a6e;
        }
      }
    }
  }
}
.index_three {
  // width: 12%;
  height: 126px;
  padding-right: 10px;
  margin-bottom: 15px;
  // padding: 0 46px;
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  background-color: #ffffff;
  border-radius: 5px;
  box-shadow: 0px 5px 20px #e4e4e4;
  > img {
    width: 40px;
    height: 40px;
  }
  > p:nth-of-type(1) {
    font-size: 28px;
    font-weight: 400;
    color: #515a6e;
  }
  > p:nth-of-type(2) {
    font-size: 15px;
    color: #798090;
  }
}
.index_three:last-of-type {
  margin-right: auto;
}
</style>
